#ifndef INI_UTIL_H
#define INI_UTIL_H

#include <QtCore>

//Ini工具(统一读取和写入各个ini中的参数)
class CIniUtil
{
private:
    CIniUtil() = delete;
    ~CIniUtil() = delete;

public:
    static int ReadIntParam(const QString& strFile, const QString& strGroup, const QString& strKey, int iDefaultValue = 0);
    static float ReadFloatParam(const QString& strFile, const QString& strGroup, const QString& strKey, float fDefaultValue = 0.0);
    static QString ReadStringParam(const QString& strFile, const QString& strGroup, const QString& strKey, QString strDefaultValue = "");

    static void WriteIntParam(const QString& strFile, const QString& strGroup, const QString& strKey, int ivalue);
    static void WriteFloatParam(const QString& strFile, const QString& strGroup, const QString& strKey, float fvalue, int prec = 1);
    static void WriteStringParam(const QString& strFile, const QString& strGroup, const QString& strKey, QString strvalue);

};

#endif // INI_UTIL_H
